//
//  GYLock.h
//  LockManagement
//
//  Created by 丁燕春 on 2018/8/5.
//  Copyright © 2018年 yunjiazhineng. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface GYLock : NSObject

/** 锁具编号 */
@property (nonatomic, strong) NSString *lockID;

/** 锁具名称 */
@property (nonatomic, strong) NSString *lockName;

/** 锁具状态 */
@property (nonatomic, assign) BOOL lockState;

/** 所属区域编号 */
@property (nonatomic, strong) NSString *areaID;

/** 所属区域名称 */
@property (nonatomic, strong) NSString *areaName;

/** 锁具经度 */
@property (nonatomic, assign) float lng;

/** 锁具纬度 */
@property (nonatomic, assign) float lat;

/** 编码用户 */
@property (nonatomic, assign) int codeID;

/** 编码用户名 */
@property (nonatomic, strong) NSString *codeName;

/** 编码时间 */
@property (nonatomic, strong) NSString *codeTime;

/** 代表该锁具是否被选选中(该行cell的模型是否被选中) */
@property (nonatomic, getter=isSelected) BOOL selected;

/**
 加载网络锁具数据

 @param success <#success description#>
 */
+ (void)getLockListsWithlockName:(NSString *)lockName current:(NSString *)current pageSize:(NSString *)pageSize success:(void (^)(NSArray *locklists))success error:(void(^)(NSError *error))failed;

/**
 解析已经获取的锁具数据

 @param source 数据源
 @return <#return value description#>
 */
+ (NSArray *)jsonLockListData:(NSArray *)source;

/**
 锁具编码 方法
 
 @param lockID 锁具ID
 @param lng 经度
 @param lat 纬度

 @param success <#success description#>
 @param failed <#failed description#>
 */
- (void)lockCode:(NSString *)lockID lng:(float)lng lat:(float)lat success:(void (^)(BOOL success))success error:(void(^)(NSError *error))failed;

@end
